package edu.xidian.forum.service;

import com.baomidou.mybatisplus.extension.service.IService;
import edu.xidian.forum.common.Result;
import edu.xidian.forum.dto.LoginDto;
import edu.xidian.forum.dto.RegisterDto;
import edu.xidian.forum.entity.User;
import edu.xidian.forum.vo.ProfileVO;

public interface UserService extends IService<User> {
    /**
     * 验证新注册账户或邮箱是否被使用
     */
    Result<Void> executeRegister(RegisterDto registerDto);

    /**
     * 登录功能，验证账号是否存在，密码是否正确 返回token
     */
    Result<String> executeLogin(LoginDto loginDto);

    User getUser(String username);

    User getUserToFrontend(String username);

    User checkEmail(String email);

    ProfileVO getProfile(String id);

    Boolean isAdmin(String username);

}